package com.zb.hms.base.util.validationUtil.constraint;

import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.CONSTRUCTOR;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import javax.validation.Constraint;
import javax.validation.OverridesAttribute;
import javax.validation.Payload;
import javax.validation.ReportAsSingleViolation;
import javax.validation.constraints.Pattern;


import com.zb.hms.base.util.stringUtil.RegexConstants;
import com.zb.hms.base.util.validationUtil.constraintValidation.NameValidator;

/**
 * 
 * 验证昵称
 * 新版本的说明，多个新版本依次换行说明
 * @author zb
 * @date : 2017年8月24日 下午6:49:51
 * @version V1.0
 * @since JDK 1.8
 */
@Documented
@Constraint(validatedBy =NameValidator.class)
@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
@Retention(RUNTIME)
@ReportAsSingleViolation
//@Pattern(regexp = "")
public @interface Name {
	String message() default   RegexConstants.ISNAMEMES;

	Class<?>[] groups() default { };

	Class<? extends Payload>[] payload() default { };
}
